#ifndef __TEMP_SAMPLE_H
#define __TEMP_SAMPLE_H
#include "allThread.h"


typedef enum
{
    TS_AREA_PHASE_A0 = 0,   /* A相左 */
    TS_AREA_PHASE_B0,       /* B相左 */
    TS_AREA_PHASE_C0,       /* C相左 */
    TS_AREA_PHASE_A1,       /* A相右 */
    TS_AREA_PHASE_B1,       /* B相右 */
    TS_AREA_PHASE_C1,       /* C相右 */

    TS_AREA_QTY,
} tempSampleArea_t;


typedef enum
{
    TS_POINT_23 = 0,
    TS_POINT_14,

    TS_POINT_QTY,
} tempSamplePoint_t;


#define TS_ENTRY_INIT(ch, tsArea, tsPoint, ...) \
{ \
    .idxCh        = (ch), \
    .chInfo.area  = (tsArea), \
    .chInfo.point = (tsPoint), \
}


void TempSample_Thread(void *pPara);


/**
 * @brief 获取采样点AD
 */
int TempSample_GetSamplePointAdValue(tempSampleArea_t area, tempSamplePoint_t point, uint16_t *pAdValue);


/**
 * @brief 获取采样点温度
 */
int TempSample_GetSamplePointTemperature(tempSampleArea_t area, tempSamplePoint_t point, int16_t *pTemp);


/**
 * @brief 获取域温度
 */
int TempSample_GetTemperature(tempSampleArea_t area, int16_t *pTemp);


/**
 * @brief 获取最大温度
 */
int TempSample_GetMaxTemperature(int16_t *pTemp);


#endif

